﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<MedicalManagementSystem.Models.DiseaseNote>>" %>
<table id="patientChartViewTable" class="data_table">
    <tr>
        <th width="100">
            Заболевание
        </th>
        <th>
            Дата начала
        </th>
        <th>
            Дата окончания
        </th>
        <th>
            Подтверждён
        </th>
    </tr>
    <%foreach (var diseaseNote in Model){
          diseaseNote.Load();%>
    <tr>
        <td>
            <%=Html.Encode(diseaseNote.Diagnos.Name)%>
        </td>
        <td>
            <%=Html.Encode(diseaseNote.DateStart.ToShortDateString())%>
        </td>
        <td>
            <%if (diseaseNote.DateEnd.HasValue)
              {%>
            <%=Html.Encode(diseaseNote.DateEnd.Value.ToShortDateString())%>
            <%}%>
        </td>
        <td>
            <%if (diseaseNote.Confirmed.HasValue)
              {%>
            <%=Html.Encode(diseaseNote.Confirmed.Value ? "Да" : "Нет")%>
            <%}%>
        </td>
    </tr>
    <%}%>
</table>
